﻿using System;

namespace PgBirdie.Core.Model.Database.Structure.Constraint
{
    public class PgConstraintBase : PgDbObject, IUid
    {
        public string Uid { get; private set; }
        public PgTable Table { get; private set; } 
        public ConstraintType ConstraintType { get; private set; }

        public PgConstraintBase(string name, PgTable table, ConstraintType constraintType) : base(name)
        {
            Uid = String.Format("{0}|{1}|{2}", table.Schema.Name, table.Name, name);
            Table = table;
            ConstraintType = constraintType;
        }
    }
}